//! Implementation of class Rectangle
/*!
\file Rectangle.cpp
\author Andreas Lehner
\date 13.11.2012
*/

#include "Rectangle.h"

static const std::string l_bracket = "<";
static const std::string r_bracket = ">";
static const std::string apostrophe = "\"";
static const std::string rect = "rect";
static const std::string x = "x=";
static const std::string y = "y=";
static const std::string width = "width=";
static const std::string height = "height=";
static const std::string stroke = "stroke=";
static const std::string slash = "/";

void Rectangle::WriteShape(std::ostream & stream){
	stream << l_bracket << rect << " " << x << apostrophe << mX << apostrophe << " ";
	stream << y << apostrophe << mY << apostrophe << " " << width << apostrophe << mWidth << apostrophe << " ";
	stream << height << apostrophe << mHeight << apostrophe << " " << stroke << apostrophe << mColor << apostrophe << " ";
	DoWrite(stream);
	stream << slash << r_bracket << std::endl;
}